package com.agricultural.command;

import com.agricultural.equipment.AgriculturalEquipment;

public class StartCommand implements Command {
    private AgriculturalEquipment equipment;

    public StartCommand(AgriculturalEquipment equipment) {
        this.equipment = equipment;
    }

    @Override
    public void execute() {
        System.out.println("执行启动命令: " + equipment.getEquipmentId());
        equipment.start();
    }

    @Override
    public void undo() {
        System.out.println("撤销启动命令: " + equipment.getEquipmentId());
        equipment.stop();
    }

    @Override
    public String getDescription() {
        return "启动设备: " + equipment.getEquipmentId();
    }
}    